{include file="header.tpl"}
<script type="text/javascript">

    addLoadEvent(function () {
        var src = config['wwwroot'] + 'artefact/feedback/js/feedback.js';
        var scripts = document.getElementsByTagName('script');

        var script = null;
        for(var i= 0; i < scripts.length; i++)
        {
            if(scripts[i].getAttribute('src') == src){
                return;
            }
        }

        var head= document.getElementsByTagName('head')[0];
        var script= document.createElement('script');
        script.type= 'text/javascript';
        script.src= src;
        head.appendChild(script);
    });

</script>

{if $back_href}<h4><a href="{$back_href}">{str tag=backtoview section=artefact.feedback}</a></h4>{/if}

{if $can_edit}
    <fieldset id="add_form" class="collapsible {if !$show_form}collapsed{/if}">
        <legend><a href="#" onclick="toggleElementClass('collapsed', 'add_form'); return false;">{str tag=Add section=artefact.feedback}</a></legend>
        {$form|safe}
    </fieldset>
{/if}
<div id="feedback_data" style="width:100%; ">
    <table id="{$table_id}" style="width:100%;">
        <tbody>
            {include file="feedback_items.tpl"}
        </tbody>
    </table>
</div>
{$pagination_html|safe}
{include file="footer.tpl"}